package ae.pcfc.cldos.online.common.tscdb.domain.manager.provider;

import java.util.Collections;
import java.util.List;

import ae.pcfc.cldos.online.common.tscdb.dao.TTScEmirateCityDAO;
import ae.pcfc.cldos.online.common.tscdb.domain.TTscEmirateCity;
import ae.pcfc.cldos.online.common.tscdb.domain.manager.TTscEmirateCityDOM;


/**
 * DOM Impl for getting the list of emirates cities w.r.t provided Emirate
 * @author ammar
 *
 */

public class TTscEmirateCityDOMImpl implements TTscEmirateCityDOM {
	
	private TTScEmirateCityDAO emirateCityDAO;
	
	

		public void setEmirateCityDAO(TTScEmirateCityDAO emirateCityDAO) {
		this.emirateCityDAO = emirateCityDAO;
	}


    @SuppressWarnings("unchecked")
	public List<TTscEmirateCity> getEmirateCityByEmirateCode(String emirateCode) {
		List<TTscEmirateCity> emirateCities = emirateCityDAO.getEmirateCityByEmirateCode(emirateCode);
		return (emirateCities != null ? emirateCities : ((List<TTscEmirateCity>)Collections.EMPTY_LIST));
	}

}
